home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -screenplay- / shareware / boulderdäsh / install / boulderdäsh.install < prev    next >
Text File  |  1999-04-20  |  31KB  |  794 lines

  1. ; $VER: BoulderDäsh.install 4.27 (27.10.98)
  2. ; Install script for BoulderDäsh (Workbench 2.0 or higher)
  3. ;
  4. (COMPLETE 0)
  5. ;(USER 2)
  6. ;(DEBUG)
  7. (SET #ApplicationName "BoulderDäsh")
  8. (SET #ApplicationDir "sys:")
  9. (SET #ApplicationDir1 "work:")
  10. (SET #ApplicationDir2 "games:")
  11. (SET #ApplicationDir3 "game:")
  12. (SET #ApplicationDir4 "work:games")
  13. (SET #ArchiveDir "/")
  14. (SET #Language -1)
  15. (SET #Documents -1)
  16. (SET #ApplicationKeyfile (CAT #ApplicationName ".key"))
  17. (SET #CDMode "0") ;"1" if used on BoulderDäshCD:
  18. ;=============================================================================
  19. ; English strings
  20. ;=============================================================================
  21.  
  22. (SET default_lang 4)
  23.  
  24. (SET #bad-kick "You must have at least Workbench 2.0+")
  25. (SET #bad-installer
  26. (CAT "You have an old version of the program 'Installer' "
  27.      "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
  28.      "Please check your configuration!\n"
  29. ))
  30.  
  31. (SET #App-InstallMsg
  32. (CAT "\n\n%s Installation Script.\n\n"
  33.         "This script installs %s on your Amiga.\n\n"
  34.         "Read the guide file for more information\n"
  35.         " on the distribution of %s.\n\n"
  36.         "%s © 1995-99 Guido Mersmann\n"
  37.         "All rights reserved."
  38. ))
  39. (SET #App-MainMode "Please choose mode:")
  40. (SET #App-InstallMode "Please choose the type of installation:")
  41.  
  42. (SET #App-Where
  43. (CAT "Where would you like to install %s ?\n"
  44.         "(A drawer will be created)"
  45. ))
  46.  
  47. (SET #App-Update
  48. (CAT "\n\nA %s drawer does already exist in the selected "
  49.         " directory.\n\n By selecting \"Proceed\", you"
  50.         " indicate that you want to update the %s"
  51.         " installation with the most recent version.\n\n"
  52.         "Several %s specific files will be overwritten!"
  53. ))
  54.  
  55. (SET #App-Main "Which %s version should be installed ?")
  56. (SET #App-Main-help
  57. (CAT "The OS2.0+ version should only be used on Systems with OS2."
  58.      " The OS2.1+ and the OS3.0+ version need less Memory. Locale is required!"
  59.      " Special OS3.0+ functions are used to save more memory."
  60. ))
  61.  
  62. (SET #App-Language "Which languages should be installed ?")
  63. (SET #App-Language-help
  64. (CAT "\nThe Amiga can be operated in many different"
  65.           " languages."
  66.           "To reduce the amount of space consumed by the"
  67.           " language files, you can select to have only the"
  68.           " files of specific languages copied.\n\n"
  69.           "Simply check the boxes of the languages you wish"
  70.           " to have available on your system.\n\n"
  71.           @askoptions-help
  72. ))
  73.  
  74. (SET #App-Docs "Which Amiga-guide files should be installed ?")
  75.  
  76. (SET #startup-prompt    "\n\nSome lines need to be added to S:User-Startup for %s\n\n%s")
  77.  
  78. (SET #App-Exit "\n\n%s installed !!\n\n%s can be found in your \"%s\" drawer (or partiton).")
  79. ;--------- DEINSTALLATION STRINGS
  80. (SET #App-DeInstallWhere "Where is the location of %s ?\n")
  81. (SET #App-Install "Install")
  82. (SET #App-DeInstall "Deinstall")
  83. (SET #bad-DeInstall "There is no %s installation at the specified position!")
  84. (SET #StartupRemove-prompt "\nRemove %s lines within your user-startup?")
  85. (SET #Deinstall-Done "\n%s is now deinstalled.")
  86. ;--------- MINIMUM INSTALLATION STRINGS
  87. (SET #App-InstMinimum "Minimum Installation")
  88. (SET #App-InstMaximum "Maximum Installation")
  89. (SET #App-InstMaximumHelp
  90. (CAT  "\nThe minimum installation requires around 3KB on your hard disk!"
  91.       " It is creating an script file, an icon and some drawers to save"
  92.       " BoulderDäsh specific data like settings, scores, your own levels,"
  93.       " etc."
  94.       "\n\nThe maximum installation requires around 7MB on your hard disk!"
  95.       " A complete installation will speed up the game loading! That`s all."
  96.       " The game play is absolute the same, even when using an 1x CDROM!"
  97.       "\n\nThe CD is required for copyright protection, exept you own an "
  98.       " BoulderDäsh keyfile."
  99. ))
  100. ;=============================================================================
  101. ; German strings
  102. ;=============================================================================
  103. (IF (= @language "deutsch")
  104. (
  105. (SET default_lang 2)
  106.  
  107. (SET #bad-kick "Sie benötigen Workbench 2.0 oder größer")
  108. (SET #bad-installer
  109. (CAT "Achtung! Es ist eine alte Version des Programmes 'Installer' "
  110.      "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
  111.      "Bitte überprüfen Sie Ihre Konfiguration!\n"
  112. ))
  113.  
  114. (SET #App-InstallMsg
  115. (CAT "\n%s Installationsskript.\n\n"
  116.         "Dieses Skript installiert oder deinstalliert\n"
  117.         "%s auf Ihrem Amiga.\n\n"
  118.         "Lesen Sie die Anleitungsdatei für weitere Informationen\n"
  119.         " über den Vertrieb von %s.\n\n"
  120.         "%s © 1995-99 Guido Mersmann\n"
  121.         "Alle Rechte reserviert."
  122. ))
  123. (SET #App-MainMode "Wählen Sie den gewüschten Vorgang:")
  124. (SET #App-InstallMode "Wählen Sie die Art der Installation:")
  125.  
  126. (SET #App-Where
  127. (CAT "Wo möchten Sie %s installieren ?\n"
  128.         "(Ein Verzeichnis wird angelegt)"
  129. ))
  130.  
  131. (SET #App-Update
  132. (CAT "\nEin %s-Verzeichnis existiert im ausgewählen"
  133.         " Verzeichnis.\n\n Wenn Sie fortfahren,"
  134.         " bestätigen Sie, daß Sie die alte %s-Installation"
  135.         " mit der neuesten Version überschreiben wollen.\n\n"
  136.         "Verschiedene %s-Dateien (z.B überflüssige Dateien) werden falls nötig überschrieben!"
  137. ))
  138.  
  139. (SET #App-Main "Welche Version von %s möchten Sie installieren?")
  140. (SET #App-Main-help
  141. (CAT "Die OS2.0+ Version läuft unter allen Systemen ab OS2.0."
  142.      " Die OS2.1+ Version hat den Nutzen, daß sie weniger Resourcen"
  143.      " benutzt, wenn sich %s im Hintergrund befindet. Dazu MUß"
  144.      " die Locale.library eingebunden sein. Für die OS3.0+ gilt das selbe"
  145.      " wie für die OS2.1 Verison. Es werden OS3.0+ Routinen benutzt, die"
  146.      " weiteren Speicher sparen."
  147. ))
  148.  
  149. (SET #App-Language "Welche Sprachen sollen installiert werden ?")
  150.  
  151. (SET #App-Language-help
  152. (CAT "\nDer Amiga kann in vielen verschiedenen Sprachen"
  153.          " arbeiten. Um Plattenkapazität zu sparen können Sie"
  154.          " nur die Sprachen anwählen, die sie benötigen"
  155.          " Haken Sie also einfach die Sprachen ab, die Sie"
  156.          " Ihrem System zugänglich machen wollen."
  157.           @askoptions-help
  158. ))
  159.  
  160. (SET #App-Docs "Welche Anleitungs- und Informationsdateien wollen Sie installieren ?")
  161.  
  162. (SET #startup-prompt    "\n\nJetzt werden für %s folgende Eintragungen in die S:User-Startup gemacht:\n\n%s")
  163.  
  164. (SET #App-Exit "\n\n%s installiert!!\n\nSie finden %s im Verzeichnis \"%s\"")
  165. ;------- DEINSTALL STRINGS
  166. (SET #App-DeinstallWhere "Wo liegt %s auf Ihrer Platte ?\n")
  167. (SET #App-Install "%s Installieren")
  168. (SET #App-DeInstall "%s Deinstallieren")
  169. (SET #bad-DeInstall "Es gibt keine %s Installation an der angegeben Position")
  170. (SET #StartupRemove-prompt "\n\nDie zu %s gehörenden Einträge in der User-startup werden gelöscht!")
  171. (SET #Deinstall-Done "\n%s ist jetzt deinstalliert!")
  172. ;--------- MINIMUM INSTALLATION STRINGS
  173. (SET #App-InstMinimum "Minimale Installation")
  174. (SET #App-InstMaximum "Maximale Installation")
  175. (SET #App-InstMaximumHelp
  176. (CAT  "\nDie minimale Installation benötigt ca 3KB auf Ihrer Festplatte!"
  177.       " Es werden nur eine Skriptdatei, einige Piktogramme und ein paar"
  178.       " Verzeichnisse erstellt, die BoulderDäsh braucht um Voreinstellungen,"
  179.       " Hiscores und z.B Ihre eigenen Level und Spiele zu speichern."
  180.       "\n\nDie maximale Installation benötigt ca 7MB auf Ihrer Festplatte!"
  181.       " Der Vorteil liegt hier eigentlich nur im schnelleren Zugriff bei"
  182.       " einem langsammen CDROM-Laufwerk. Auf das Spiel selber hat das aber"
  183.       " keinerlei Auswirkungen, da alle Daten vor Spielbeginn geladen werden."
  184.       "\n\nDie CD wird auch bei einer Komplettinstallation  immer noch"
  185.       " als Kopierschutz benötigt, es sei den Sie besitzen Ihr persönliches"
  186.       " BoulderDäsh keyfile"
  187. ))
  188.  
  189. )) ;IF Language
  190. ;=============================================================================
  191. ; français strings
  192. ;=============================================================================
  193.  
  194. (IF (= @language "français")
  195. (
  196. (SET default_lang 1)
  197.  
  198. (SET #bad-kick "Il vous faut le Workbench 2.0+")
  199. (SET #bad-installer
  200. (CAT "Vous avez une vieille version du programme 'Installer' "
  201.      "sur votre Amiga!\n\nLa procédure d'installation nécessite au moins Installer 42.9.\n\n"
  202.      "Vérifiez votre configuration!\n"
  203. ))
  204.  
  205. (SET #App-InstallMsg
  206. (CAT "\n\n%s Scénario d'installation.\n\n"
  207.         "Ce scénario installe %s sur votre Amiga.\n\n"
  208.         "Lisez le fichier guide pour des informations\n"
  209.         "sur la distribution de of %s.\n\n"
  210.         "%s © 1995-99 Guido Mersmann\n"
  211.         "Tous droits réservés.\n\n"
  212.     "Traduction française: Frédéric Delacroix"
  213. ))
  214. (SET #App-MainMode "Choisissez le mode:")
  215. (SET #App-InstallMode "Choisissez le type d'installation:")
  216.  
  217. (SET #App-Where
  218. (CAT "Où voulez-vous installer %s ?\n"
  219.         "(Un tiroir sera créé)"
  220. ))
  221.  
  222. (SET #App-Update
  223. (CAT "\n\nUn tiroir %s existe déja dans le répertoire sélectionné\n\n"
  224.         "En cliquant sur \"Continuer\", vous indiquez que vous voulez "
  225.         "mettre votre installation de %s à jour, avec la version la "
  226.         "plus récente. Plusieurs fichiers spécifiques à %s seront "
  227.         "ecrasés!"
  228. ))
  229.  
  230. (SET #App-Main "Quelle version de %s doit-elle être installée ?")
  231. (SET #App-Main-help
  232. (CAT "La version OS2.0+ ne devrait être utilisée que sur les systèmes équipés de l'OS2."
  233.      " Les versions OS2.1+ et OS3.0+ nécessitent moins de mémoire. La locale est requise!"
  234.      " Les fonctions spécifiques à l'OS3.0+ sont utilisées pour économiser davantage de mémoire."
  235. ))
  236.  
  237. (SET #App-Language "Quelles langues sont à installer ?")
  238. (SET #App-Language-help
  239. (CAT "\nL'Amiga peut fonctionner dans beaucoup de langues différentes."
  240.           "Pour réduire la quantité d'espace utilisé par les fichiers de langue, vous "
  241.           "pouvez choisir de n'en installer que certains.\n\n"
  242.       "Cochez simplement les cases des langues que vous voulez utiliser sur votre "
  243.       "système.\n\n"
  244.           @askoptions-help
  245. ))
  246.  
  247. (SET #App-Docs "Quels fichiers AmigaGuide voulez-vous installer ?")
  248. (SET #startup-prompt    "\n\nDes lignes doivent être ajoutées à votre S:User-Startup pour %s\n\n%s")
  249. (SET #App-Exit "\n\n%s installé !!\n\n%s se trouve dans votre tiroir (ou partition) \"%s\".")
  250. ;--------- DEINSTALLATION STRINGS
  251. (SET #App-DeInstallWhere "Où se trouve %s ?\n")
  252. (SET #App-Install "Installer")
  253. (SET #App-DeInstall "Désinstaller")
  254. (SET #bad-DeInstall "Il n'y a pas d'installation de %s à l'endroit indiqué!")
  255. (SET #StartupRemove-prompt "\nRetirer les lignes de %s de votre user-startup?")
  256. (SET #Deinstall-Done "\n%s a été désinstallé.")
  257. ;--------- MINIMUM INSTALLATION STRINGS
  258. (SET #App-InstMinimum "Installation minimale")
  259. (SET #App-InstMaximum "Installation maximale")
  260. (SET #App-InstMaximumHelp
  261. (CAT  "\nL'installation minimale requiert environ 3Ko sur votre disque dur!"
  262.       " Elle crée un scénario, une icône et quelques tiroirs pour sauvegarder"
  263.       " les données spécifiques à BoulderDäsh comme les réglages, les records,"
  264.       " vos niveaux, etc."
  265.       "\n\nL'installation maximale requiert environ 7Mo sur votre disque dur!"
  266.       " Une installation complète accélère le chargement du jeu! C'est tout."
  267.       " Le jeu lui-même est strictement identique, même avec un CD-ROM 1x!"
  268.       "\n\nLe CD est nécessaire pour la protection du copyright, sauf si vous"
  269.       " possédez un fichier-clé pour BoulderDäsh."
  270. ))
  271. )) ;IF Language
  272. ;----------------------------------------------------------------------------
  273. ;----------------------------------------------------------------------------
  274. ;       P_Requirements
  275. ;----------------------------------------------------------------------------
  276. ;----------------------------------------------------------------------------
  277. (PROCEDURE P_Requirements
  278. ; Workbench 37 or better required
  279. (IF (< (/ (getversion) 65536) 37)
  280. (
  281.   (abort #bad-kick)
  282. )
  283. )
  284. ; Installer 42.9 or better required
  285. (if (< @installer-version 2752521)
  286. (
  287. (abort #bad-installer)
  288. )
  289. ) ;if
  290. ) ;PROCDURE
  291. ;----------------------------------------------------------------------------
  292. ;----------------------------------------------------------------------------
  293. ;       P_DeInstall
  294. ;----------------------------------------------------------------------------
  295. ;----------------------------------------------------------------------------
  296. (PROCEDURE P_DeInstall #InstallerMode
  297.  
  298. (SET #Dummy             (ASKCHOICE
  299.                         (PROMPT #App-MainMode)
  300.                         (HELP @askchoice-help)
  301.                         (CHOICES
  302.                                 (#App-Install #ApplicationName)
  303.                                 (#App-Deinstall #ApplicationName)
  304.                         )
  305.                         ;(DEFAULT #Documents)
  306.                         )
  307. )
  308. ) ;PROCDURE
  309. ;----------------------------------------------------------------------------
  310. ;----------------------------------------------------------------------------
  311. ;       P_MinimumInstall
  312. ;----------------------------------------------------------------------------
  313. ;----------------------------------------------------------------------------
  314. (PROCEDURE P_MinimumInstall #MinimumMode
  315.  
  316.  (IF (= #CDMode "1")
  317.  (
  318.    (SET #Dummy             (ASKCHOICE
  319.                            (PROMPT #App-MinimumMode)
  320.                            (HELP #App-InstMaximumHelp)
  321.                            (CHOICES
  322.                                    (#App-InstMinimum #ApplicationName)
  323.                                    (#App-InstMaximum #ApplicationName)
  324.                            )
  325.                            ;(DEFAULT #Documents)
  326.                            )
  327.    ) ;SET
  328.  ))
  329.  
  330.  (IF (= #CDMode "0")
  331.  (
  332.    (SET #Dummy "1")
  333.  ))
  334. ) ;PROCDURE
  335. ;----------------------------------------------------------------------------
  336. ;----------------------------------------------------------------------------
  337. ;       GetApplicationDir
  338. ;----------------------------------------------------------------------------
  339. ;----------------------------------------------------------------------------
  340. (PROCEDURE P_GetApplicationDir #Dummy
  341. (SET #Dummy #ApplicationDir)
  342. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  343. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  344. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  345. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  346.  
  347. (SET #ApplicationDir
  348.         (TACKON
  349.                 (ASKDIR
  350.                         (PROMPT (#App-Where #ApplicationName))
  351.                         (HELP @askdir-help)
  352.                         (Default #Dummy)
  353.                 )
  354.                 #ApplicationName
  355.         )
  356. )
  357. (SET @default-dest #ApplicationDir)
  358. ) ;PROCEDURE
  359. ;----------------------------------------------------------------------------
  360. ;----------------------------------------------------------------------------
  361. ;       GetDeinstallDir
  362. ;----------------------------------------------------------------------------
  363. ;----------------------------------------------------------------------------
  364. (PROCEDURE P_GetDeInstallDir
  365. (SET #Dummy #ApplicationDir)
  366. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  367. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  368. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  369. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  370.  
  371. (SET #ApplicationDir
  372.                 (ASKDIR
  373.                         (PROMPT (#App-DeInstallWhere #ApplicationName))
  374.                         (HELP @askdir-help)
  375.                         (default #Dummy)
  376.                 )
  377. )
  378.          (SET #Dummy (EXISTS (TACKON #Applicationdir #ApplicationName)))
  379.  
  380.         (Select #Dummy
  381.          (abort (#bad-DeInstall #ApplicationName))
  382.          (SET #Applicationdir #Applicationdir)
  383.          (SET #Applicationdir (TACKON #Applicationdir #ApplicationName))
  384.         ) ;Select
  385. (SET @default-dest #ApplicationDir)
  386.  
  387. ) ;PROCEDURE
  388. ;----------------------------------------------------------------------------
  389. ;----------------------------------------------------------------------------
  390. ;       Ask for Catalogs
  391. ;----------------------------------------------------------------------------
  392. ;----------------------------------------------------------------------------
  393. (PROCEDURE P_AskCatalogs #Language
  394.  
  395. (SET #Dummy     (ASKOPTIONS
  396.                 (PROMPT #App-Language)
  397.                 (HELP #App-Language-help)
  398.                 (CHOICES
  399.                         "English"
  400.                         "Deutsch"
  401.                         "Français")
  402.                 (DEFAULT #Language)
  403.         )
  404. )
  405. ) ;PROCEDURE
  406. ;----------------------------------------------------------------------------
  407. ;----------------------------------------------------------------------------
  408. ;       Copy Selected Catalogs
  409. ;----------------------------------------------------------------------------
  410. ;----------------------------------------------------------------------------
  411. (PROCEDURE P_CopyCatalogs #Language
  412. (SET n 0)
  413. (SET #DestinationRoot (TACKON #ApplicationDir "Catalogs"))
  414. (SET #SourceRoot (TACKON #ArchiveDir "Catalogs"))
  415. (MAKEDIR #DestinationRoot)
  416.  
  417. (while (< n 3)
  418.         (SET #Dummy (SELECT n "english" "deutsch" "français"))
  419.         (
  420.                 (IF (IN #Language n)
  421.                 (
  422.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  423.                         (COPYFILES
  424.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  425.                                 (DEST (TACKON #DestinationRoot #Dummy))
  426.                                 (HELP @copyfiles-help)
  427.                                 (ALL)
  428.                         )
  429.                 )
  430.                 )
  431.         )
  432. (SET n (+ n 1))
  433. )
  434. ) ;PROCEDURE
  435. ;----------------------------------------------------------------------------
  436. ;----------------------------------------------------------------------------
  437. ;       Ask for docs
  438. ;----------------------------------------------------------------------------
  439. ;----------------------------------------------------------------------------
  440. (PROCEDURE P_AskDocs #Documents
  441. (SET #Dummy             (ASKOPTIONS
  442.                         (PROMPT #App-Docs)
  443.                         (HELP @askoptions-help)
  444.                         (CHOICES
  445.                                 "english"
  446.                                 "deutsch"
  447.                                 "français"
  448.                         )
  449.                         (DEFAULT #Documents)
  450.                   )
  451. )
  452. ) ;PROCEDURE
  453. ;----------------------------------------------------------------------------
  454. ;----------------------------------------------------------------------------
  455. ;       Copy docs
  456. ;----------------------------------------------------------------------------
  457. ;----------------------------------------------------------------------------
  458. (PROCEDURE P_CopyDocs #Documents
  459. (SET n 0)
  460. (SET #DestinationRoot (TACKON #ApplicationDir "Docs"))
  461. (SET #SourceRoot (TACKON #ArchiveDir "Docs"))
  462. (MAKEDIR #DestinationRoot)
  463.  
  464. (while (< n 3)
  465.         (SET #Dummy (SELECT n
  466.                 "english"
  467.                 "deutsch"
  468.                 "français"
  469.         )
  470.         )
  471.         (
  472.                 (IF (IN #Documents n)
  473.                 (
  474.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  475.                         (COPYFILES
  476.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  477.                                 (DEST (TACKON #DestinationRoot #Dummy))
  478.                                 (HELP @copyfiles-help)
  479.                                 (INFOS)
  480.                                 (ALL)
  481.                         )
  482.                 )
  483.                 )
  484.         )
  485. (SET n (+ n 1))
  486. )
  487. ) ;PROCEDURE
  488. ;----------------------------------------------------------------------------
  489. ;----------------------------------------------------------------------------
  490. ;       Copy_Dir (Dir)
  491. ;----------------------------------------------------------------------------
  492. ;----------------------------------------------------------------------------
  493. (PROCEDURE P_CopyDir #Dummy
  494.  
  495. (SET #DestinationRoot (TACKON #ApplicationDir #Dummy))
  496. (SET #SourceRoot (TACKON #ArchiveDir #Dummy))
  497. (MAKEDIR #DestinationRoot)
  498.  
  499.                    (COPYFILES
  500.         (SOURCE #SourceRoot)
  501.         (DEST #DestinationRoot)
  502.         (HELP @copyfiles-help)
  503.         (OPTIONAL <force>)
  504.         (ALL)
  505.         (INFOS)
  506.                    )
  507. ) ;PROCEDURE
  508. ;----------------------------------------------------------------------------
  509. ;----------------------------------------------------------------------------
  510. ;       Copy_File (Name)
  511. ;----------------------------------------------------------------------------
  512. ;----------------------------------------------------------------------------
  513. (PROCEDURE P_CopyFile #Dummy
  514.  
  515. (if (<> (exists (TACKON #ArchiveDir #Dummy) (noreq)) 0)
  516. (
  517.                    (COPYFILES
  518.         (SOURCE (TACKON #ArchiveDir #Dummy))
  519.         (DEST #ApplicationDir)
  520.         (HELP @copyfiles-help)
  521.         (OPTIONAL <force>)
  522.         (ALL)
  523.         (INFOS)
  524.                    )
  525. )
  526. ) ;If
  527. ) ;PROCEDURE
  528. ;----------------------------------------------------------------------------
  529. ;----------------------------------------------------------------------------
  530. ;       P_Update
  531. ;----------------------------------------------------------------------------
  532. ;----------------------------------------------------------------------------
  533. (PROCEDURE P_Update
  534. (if (= (exists #ApplicationDir) 2)
  535.         (message (#App-Update #ApplicationName #ApplicationName #ApplicationName))
  536. )
  537. ) ;PROCEDURE
  538. ;----------------------------------------------------------------------------
  539. ;----------------------------------------------------------------------------
  540. ;       P_AskBinary
  541. ;----------------------------------------------------------------------------
  542. ;----------------------------------------------------------------------------
  543. (PROCEDURE P_AskBinary
  544. (set #Dummy (/ (getversion) 65536))
  545.  
  546. (if (= #Dummy 37) (set #Binary 0))
  547. (if (= #Dummy 38) (set #Binary 1))
  548. (if (>= #Dummy 39) (set #Binary 2))
  549.  
  550. (set #Binary (askchoice
  551.         (prompt (#App-Main #ApplicationName))
  552.         (help (#App-Main-help #ApplicationName))
  553.         (choices
  554.         "OS2.0+"
  555.                         "OS2.1+"
  556.                         "OS3.0+"
  557.                         )
  558.         (default #Binary)
  559.             )
  560. )
  561. ) ;PROCEDURE
  562. ;----------------------------------------------------------------------------
  563. ;----------------------------------------------------------------------------
  564. ;       P_CopyBinary
  565. ;----------------------------------------------------------------------------
  566. ;----------------------------------------------------------------------------
  567. (PROCEDURE P_CopyBinary #Dummy
  568.  
  569. (set #BinaryName (SELECT #Binary #Dummy (CAT "Bin/" #Dummy "_OS21") (CAT "Bin/" #Dummy "_OS30")))
  570. (copyfiles
  571.         (source (tackon #ArchiveDir #BinaryName) (infos))
  572.         (dest #ApplicationDir)
  573.         (newname #Dummy)
  574.         (help @copyfiles-help)
  575.         (optional <force>)
  576. )
  577. ) ;PROCEDURE
  578. ;----------------------------------------------------------------------------
  579. ;----------------------------------------------------------------------------
  580. ;       P_KeyFile
  581. ;----------------------------------------------------------------------------
  582. ;----------------------------------------------------------------------------
  583. (PROCEDURE P_KeyFile
  584.  
  585. (SET #Dummy (tackon (tackon #ArchiveDir "Keyfile") #ApplicationKeyfile))
  586.  
  587. (if (<> (exists #Dummy (noreq)) 0) ((P_CopyDir "KeyFile"))
  588. )
  589. ) ;PROCEDURE
  590. ;----------------------------------------------------------------------------
  591. ;----------------------------------------------------------------------------
  592. ;       P_CopyArchiveIcon
  593. ;----------------------------------------------------------------------------
  594. ;----------------------------------------------------------------------------
  595. (PROCEDURE P_CopyArchiveIcon
  596.  
  597. (SET #Dummy (CAT (CAT (TACKON #ArchiveDir "/") #ApplicationName) ".info"))
  598.  
  599. (if (<> (exists #Dummy (noreq)) 0) 
  600.         (COPYFILES
  601.         (SOURCE #Dummy)
  602.         (DEST (TACKON #ApplicationDir "/"))
  603.         (HELP @copyfiles-help)
  604.                    )
  605. )) ;IF
  606.  
  607. ) ;PROCEDURE
  608. ;----------------------------------------------------------------------------
  609. ;----------------------------------------------------------------------------
  610. ;       P_AskBool
  611. ;----------------------------------------------------------------------------
  612. ;----------------------------------------------------------------------------
  613. (PROCEDURE P_AskBool #dummy
  614.  (SET #dummy (ASKBOOL      (prompt #dummy)
  615.            (help @askbool-help)
  616.            (default 1)
  617.              )
  618.  )
  619. ) ;PROCEDURE
  620. ;----------------------------------------------------------------------------
  621. ;----------------------------------------------------------------------------
  622. ;       P_Rename
  623. ;----------------------------------------------------------------------------
  624. ;----------------------------------------------------------------------------
  625. (PROCEDURE P_Rename #Dummy #Dummy2
  626. (if (= (exists (TACKON #ApplicationDir #Dummy)) 1)
  627.         (rename (TACKON #ApplicationDir #Dummy) (TACKON #ApplicationDir #Dummy2))
  628. )
  629. ) ;PROCEDURE
  630. ;----------------------------------------------------------------------------
  631. ;----------------------------------------------------------------------------
  632. ;       P_RealRename
  633. ;----------------------------------------------------------------------------
  634. ;----------------------------------------------------------------------------
  635. (PROCEDURE P_RealRename #Dummy #Dummy2
  636.    (Set #Dummy (TACKON #ApplicationDir #Dummy))
  637.    (Set #Dummy2 (TACKON #ApplicationDir #Dummy2))
  638.    (set #Dummy (CAT "rename " #Dummy " " #Dummy2))
  639.         (run #Dummy)
  640. ) ;PROCEDURE
  641. ;----------------------------------------------------------------------------
  642. ;----------------------------------------------------------------------------
  643. ;----------------------------------------------------------------------------
  644. ;       MAIN
  645. ;----------------------------------------------------------------------------
  646. ;----------------------------------------------------------------------------
  647. ;----------------------------------------------------------------------------
  648. (P_Requirements)
  649. (message (#App-installmsg #ApplicationName #ApplicationName #ApplicationName #ApplicationName))
  650. (SET #InstallerMode (P_DeInstall #ApplicationName))
  651. (welcome)
  652. ;-----------------------------------------------
  653. (IF (= #InstallerMode "0")
  654. (
  655. ;-----------------------------------------------
  656.  (SET #ApplicationDir (P_GetApplicationDir))
  657. (COMPLETE 1)
  658.  (P_Update)
  659. ;--- **** MINIMUM INSTALLATION CHECK ****
  660. (SET #MinimumMode (P_MinimumInstall #ApplicationName))
  661. ;-----------------------------------------------
  662. (IF (= #MinimumMode "1")
  663. (
  664. ;*****************************************************************************
  665. ;--- Normal Installation ---
  666.  
  667.  (SET #Binary (P_AskBinary))
  668. (COMPLETE 2)
  669.  (SET #Language (P_AskCatalogs #Language))
  670. (COMPLETE 3)
  671.  (SET #Documents (P_AskDocs #Documents))
  672. (COMPLETE 4)
  673.  
  674. ;***** Delete old Data and Prefs
  675. (DELETE (TACKON #ApplicationDir "ColorSets") (ALL))
  676. (DELETE (TACKON #ApplicationDir "ColorSets.info"))
  677. (DELETE (TACKON #ApplicationDir "GraphicSets/TimoHegemann/Diggers"))
  678. (DELETE (TACKON #ApplicationDir "GraphicSets/TimoHegemann/Diggers.info"))
  679. (DELETE (TACKON #ApplicationDir "GraphicSets/TimoHegemann/Diggers64"))
  680. (DELETE (TACKON #ApplicationDir "GraphicSets/TimoHegemann/Diggers64.info"))
  681. (MAKEDIR #ApplicationDir (INFOS))
  682. (MAKEDIR (TACKON #ApplicationDir "Prefs") (INFOS))
  683. (MAKEDIR (TACKON #ApplicationDir "GraphicSets/User") (INFOS))
  684. (MAKEDIR (TACKON #ApplicationDir "SampleSets/User") (INFOS))
  685. (MAKEDIR (TACKON #ApplicationDir "CharacterSets/User") (INFOS))
  686. (MAKEDIR (TACKON #ApplicationDir "MusicSets/User") (INFOS))
  687. (MAKEDIR (TACKON #ApplicationDir "Games/User") (INFOS))
  688. (MAKEDIR (TACKON #ApplicationDir "Caves/User") (INFOS))
  689.  
  690. (COMPLETE 10)
  691.  (P_CopyDir "Games")
  692. (COMPLETE 20)
  693.  (P_CopyDir "Caves")
  694. (COMPLETE 35)
  695.  (P_CopyDir "Title")
  696.  (P_CopyDir "Solves")
  697.  (P_CopyDir "Tools")
  698. (COMPLETE 45)
  699.  (P_CopyDir "Scores")
  700. (COMPLETE 55)
  701.  (P_CopyDir "SampleSets")
  702. (COMPLETE 65)
  703.  (P_CopyDir "MusicSets")
  704. (COMPLETE 75)
  705.  (P_CopyDir "GraphicSets")
  706. (COMPLETE 85)
  707.  (P_CopyDir "CharacterSets")
  708. (COMPLETE 97)
  709.  (P_CopyBinary #ApplicationName)
  710.  (P_CopyFile (CAT #ApplicationName ".info"))
  711.  (P_CopyCatalogs #Language)
  712.  (P_CopyDocs #Documents)
  713.  
  714.  (P_CopyArchiveIcon)
  715.  (P_CopyFile "Docs.info")
  716.  (P_CopyFile "GraphicSets.info")
  717.  (P_CopyFile "CharacterSets.info")
  718.  (P_CopyFile "SampleSets.info")
  719.  (P_CopyFile "MusicSets.info")
  720.  (P_CopyFile "WARNING!!!")
  721.  (P_CopyFile "WARNUNG!!!")
  722.  (P_CopyFile "AVERTISSEMENT!!!")
  723. (COMPLETE 99)
  724.  (P_Keyfile)
  725. ;--- CleanUp
  726. (DELETE (TACKON #ApplicationDir "Title.info"))
  727. (DELETE (TACKON #ApplicationDir "Tools.info"))
  728. (DELETE (TACKON #ApplicationDir "Prefs.info"))
  729. (DELETE (TACKON #ApplicationDir "Games.info"))
  730. (DELETE (TACKON #ApplicationDir "Caves.info"))
  731. (DELETE (TACKON #ApplicationDir "Solves.info"))
  732. (DELETE (TACKON #ApplicationDir "Scores.info"))
  733. (DELETE (TACKON #ApplicationDir "KeyFile.info"))
  734. (DELETE (TACKON #ApplicationDir "Install.info"))
  735. (DELETE (TACKON #ApplicationDir "Catalogs.info"))
  736. (run "avail Flush")
  737. (COMPLETE 100)
  738. (message (#App-exit #ApplicationName #ApplicationName #ApplicationDir))
  739. (exit (QUIET))
  740. )) ;IF #MinimumMode = 1
  741. ;*****************************************************************************
  742. (IF (= #MinimumMode "0")
  743. (
  744. (MAKEDIR #ApplicationDir (INFOS))
  745. (MAKEDIR (TACKON #ApplicationDir "Prefs"))
  746. (MAKEDIR (TACKON #ApplicationDir "GraphicSets/User"))
  747. (MAKEDIR (TACKON #ApplicationDir "SampleSets/User"))
  748. (MAKEDIR (TACKON #ApplicationDir "CharacterSets/User"))
  749. (MAKEDIR (TACKON #ApplicationDir "MusicSets/User"))
  750. (MAKEDIR (TACKON #ApplicationDir "Games/User"))
  751. (MAKEDIR (TACKON #ApplicationDir "Caves/User"))
  752. (MAKEDIR (TACKON #ApplicationDir "Scores"))
  753. (MAKEDIR (TACKON #ApplicationDir "Solves"))
  754.  (P_CopyFile "GraphicSets.info")
  755.  (P_CopyFile "CharacterSets.info")
  756.  (P_CopyFile "SampleSets.info")
  757.  (P_CopyFile "MusicSets.info")
  758.  
  759.  
  760.  
  761.                    (COPYFILES
  762.         (SOURCE (TACKON #ArchiveDir "s/Data/BoulderDäsh"))
  763.         (DEST #ApplicationDir)
  764.         (HELP @copyfiles-help) (OPTIONAL <force>) (ALL) (INFOS)
  765.                    )
  766.                    (COPYFILES
  767.         (SOURCE (TACKON #ArchiveDir "s/Data/DrawerIcon"))
  768.         (DEST (TACKON #ApplicationDir "/"))
  769.         (NEWNAME ("BoulderDäsh.info"))
  770.         (HELP @copyfiles-help) (OPTIONAL <force>) (ALL) (INFOS)
  771.                    )
  772. )) ;IF #MinimumMode = 1
  773. ;*****************************************************************************
  774. ;-----------------------------------------------
  775. )) ;IF #InstallerMode = 0
  776. ;-----------  Deinstallation -------------------
  777. (IF (= #InstallerMode "1") (
  778.  
  779. (SET #ApplicationDir (P_GetDeInstallDir))
  780.  
  781. (COMPLETE 30)
  782. (COMPLETE 80)
  783. (DELETE #ApplicationDir (optional FORCE) (ALL))
  784. (DELETE (Cat #ApplicationDir ".info"))
  785. (COMPLETE 100)
  786.  
  787. (Message (#Deinstall-Done #ApplicationName))
  788. (exit (QUIET))
  789. ;-----------------------------------------------
  790. )) ;IF #InstallerMode = 1
  791. ;-----------------------------------------------
  792.  
  793.